#!/bin/bash
#es的索引名
tableName=$1
#类型
esType=$2

#当前路径
basepath=$(cd `dirname $0` ;pwd)

#创建索引
curl -XPUT http://192.168.150.130:9200/$tableName
curl -XPUT http://192.168.150.130:9200/$tableName/$esType/_mapping -H 'content-Type:application/json' --data-binary @$basepath/esIndexConf/${tableName}.conf